$(function(){
	 $(document).ajaxComplete(function(event,xhr,options){
		 if(xhr.responseText == Constants.NOLOGIN.CODE){
			// var redirectUrl = encodeURIComponent(window.location.href);
			 // 当前窗体
			 var childWin = window.location.href;
			 // 父级窗体
			 var parentWin = window.parent.location.href;
			// 判断是否有打开子窗体
			 var redirectUrl = encodeURIComponent(parentWin);
			 // 判断是否有打开子窗体
			 if (childWin != parentWin) {
				 
				 window.parent.location.href = Constants.loginUrl + "app/jsp/main/login.html?redirectURL="+redirectUrl;
			 } else {
				 window.location.href = Constants.loginUrl + "app/jsp/main/login.html?redirectURL="+redirectUrl;
			 }
		 }
	 })
})